]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm/loginDialog: Reset the greeter proxy on connection closed
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 17 Sep 2025 16:26:17 +0000 (18:26 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 2 Feb 2026 14:48:15 +0000 (14:48 +0000)
If gdm fails to start the display session the greeter proxy we are using
gets disconnected, however since commit 56ea95f2 we are now preserving
the greeter instance, and this will eventually lead to using an instance
of a disconnected proxy.

This eventually implies that after a login failure, we would never get
the `::session-opened` signal that actually triggers the session start.

And thus, even the user has properly authenticated, gdm will stick to
the authentication page.

So, instead of reverting such commit (that isn't wrong per se), consume
the greeter proxy connection `::closed` signal and use it to
re-initialize the greeter instance.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3885>

js/gdm/loginDialog.js

index 70b68e304a172fda3805d8c24341101240232f34..9f8a3afc22edb287085e7fae52ffe9cbae2cc2ed 100644 (file)
@@ -1051,6 +1051,13 @@ export const LoginDialog = GObject.registerClass({
 
             this._greeter = this._gdmClient.get_greeter_sync(null);
 
+            this._greeter.get_connection().connectObject('closed', connection => {
+                connection.disconnectObject(this);
+                this._greeter.disconnectObject(this);
+                this._greeter = null;
+                this._ensureGreeterProxy();
+            }, this);
+
             this._greeter.connectObject(
                 'default-session-name-changed', this._onDefaultSessionChanged.bind(this),
                 'session-opened', this._onSessionOpened.bind(this),